﻿@model IEnumerable<Article>
<div style="padding: 10px; overflow: auto;">
    <h3>
        <img style="float: left;" src="@Url.Content("~/Content/Images/Publishing/full_page.png")"
            alt="" /><span style="float: left; margin-top: 8px;">@ViewBag.Title</span></h3>
</div>
@{Ajax.DnaFor().ListBox(Model)
      .HtmlAttributes(new { style = "width:auto;height:500px;border:none;" })
       .ItemTemplate(@<text>
    @{         
        string iconName = "doc_content";
        if (item.IsPrivate) { iconName = "doc_private"; }
        if (!item.IsPublished) { iconName = "doc_draft"; }
        var article = new ArticleWrapper(item);
    }
    <table style="width: 100%; border-bottom: 1px solid #cccccc;">
        <tr>
            <td style="vertical-align: top;">
                <input type="hidden" value="${ID}" />
                <a href="@article.PermaLink" style="color: #000000;" target="_blank">
                    <img class="d-icon" src="@Url.Content("~/content/images/" + iconName + ".gif")" alt="" />
                    <span><b><u>@item.Title</u></b></span> </a>
            </td>
            <td style="width: 100px; color: #000000; vertical-align: top;">
                @Html.Global(article.Posted)
            </td>
        </tr>
        <tr>
            <td style="width: 550px; color: #858681; white-space: normal; padding: 5px 10px 5px 20px;"
                colspan="2">
                @article.Summary
            </td>
        </tr>
        <tr>
            <td>
                <table style="color: #858681;">
                    <tr>
                        <td>
                          @Html.Global("RES_AUTHOR"):
                        </td>
                        <td>@Html.UserLink(article.Author.UserName)
                        </td>
                        <td>
                           @Html.Global("publishing", "Comments"):
                        </td>
                        <td>@article.TotalComments
                        </td>
                        <td>
                           @Html.Global("publishing", "Reads"):
                        </td>
                        <td>@article.TotalReads
                        </td>
                        <td>
                           @Html.Global("publishing", "Ratings"):
                        </td>
                        <td>@article.TotalVotes
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </text>)
       .Height(443)
       .Width(570)
        .Name("GetLasterArticlesList")
       .Render();
}
@Html.StartupScripts()
